#include"comm.hpp"


int main()
{
    //打开管道文件
    int fd = open(ipcPath.c_str(),O_WRONLY);
    assert(fd != -1);
    Log("client: open pipe success\n",Debug);

    //进程通信
    string buffer;
    while(true)
    {
        cout << "client sent a message:>";
        std::getline(std::cin,buffer);
        write(fd, buffer.c_str(),buffer.size());
    }

    //关闭管道文件
    close(fd);
    Log("client: close pipe\n",Debug);
    
    return 0;
}
